package Interfaz;

public class GenerarPass {
	
	private static String num = "1234567890";
	
	private static String may = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	 
	private static String min = "abcdefghijklmnopqrstuvwxyz";
 
	static String getPass() {
		return getPass(8);
	}
 
	private static String getPass(int longitud) {
		return getPass(num + may + min, longitud);
	}
 
	private static String getPass(String clave, int longitud) {
		String pwd = "";
 
		for (int i = 0; i < longitud; i++) {
			pwd+=(clave.charAt((int)(Math.random() * clave.length())));
		}
 
		return pwd;
	}
	
	public static void main(String[] args){
		
		//GenerarPass.getPassword(GenerarPass.min+GenerarPass.may+GenerarPass.esp,10);
		System.out.println(GenerarPass.getPass());
		
	}

}
